package newsSystem.user;

import java.util.Scanner;

public class UserInfo {
    private String UserID;
    private String UserPWD;
    private String UserName;
    private String UserSex;
    private String IDCard;
    private String Phone;
    private String Address;

    // 构造函数，用于初始化成员变量
    public UserInfo(String userID,String userPWD, String userName, String userSex, String idCard, String phone, String address) {
        this.UserID = userID;
//        this.DeptID = deptID;
        this.UserPWD = userPWD;
        this.UserName = userName;
        this.UserSex = userSex;
        this.IDCard = idCard;
        this.Phone = phone;
        this.Address = address;
    }

    // 可选：为每个成员变量提供获取和设置方法
    public String getUserID() {
        return UserID;
    }

    public void setUserID(String userID) {
        this.UserID = userID;
    }


    public String getUserPWD() {
        return UserPWD;
    }

    public void setUserPWD(String userPWD) {
        this.UserPWD = userPWD;
    }

    public String getUserName() {
        return UserName;
    }

    public void setUserName(String userName) {
        this.UserName = userName;
    }

    public String getUserSex() {
        return UserSex;
    }

    public void setUserSex(String userSex) {
        this.UserSex = userSex;
    }

    public String getIDCard() {
        return IDCard;
    }

    public void setIDCard(String idCard) {
        this.IDCard = idCard;
    }

    public String getPhone() {
        return Phone;
    }

    public void setPhone(String phone) {
        this.Phone = phone;
    }

    public String getAddress() {
        return Address;
    }

    public void setAddress(String address) {
        this.Address = address;
    }

    // 可选：重写 toString 方法，方便输出对象信息
    @Override
    public String toString() {
        return "UserInfo{" +
                "UserID=" + UserID +
                ", UserPWD='" + UserPWD + '\'' +
                ", UserName='" + UserName + '\'' +
                ", UserSex='" + UserSex + '\'' +
                ", IDCard='" + IDCard + '\'' +
                ", Phone='" + Phone + '\'' +
                ", Address='" + Address + '\'' +
                '}';
    }

    // 示例用法
//    public static void main(String[] args) {
//        // 创建 UserInfo 对象并初始化
//        UserInfo user = new UserInfo(123, 456, "password123", "John Doe", "Male", "1234567890", "123-456-7890", "123 Main St");
//        // 输出对象信息
//        System.out.println(user);
//    }
}
